<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>后台管理</title>
	    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
        <link rel="stylesheet" type="text/css" href="easyui/themes/color.css">
        <script type="text/javascript" src="easyui/jquery.min.js"></script>
        <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
        <link rel="stylesheet" href="layui/css/layui.css" media="all">
        <script type="text/javascript" src="layui/layui.all.js"></script>
    </head>
    <body class="easyui-layout">
        <div data-options="region:'south',split:true" style="height:50px;"></div>
        <div data-options="region:'west',split:true,minWidth:'100'" title="控制面板" style="width:300px;">
            <div id="sm" class="easyui-sidemenu" data-options="data:data,width:293"></div>
        
            <!-- <div class="easyui-accordion" data-options="fit:true,border:false">
                <div title="开发者功能">
                    <ul class="easyui-datalist" data-options="selected:true,fit:true,border:false">
                        <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                        <li><a href="javascript:void(0)"  onclick="addTab('用户管理','to?page=system/user/list')" style="text-decoration: none;"><h3><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户管理</b></h3></a></li>
                        <li><a href="javascript:void(0)"  onclick="addTab('账户管理','to?page=app/account/list')" style="text-decoration: none;"><h3><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账户管理</b></h3></a></li>
                        <li><a href="javascript:void(0)"  onclick="addTab('投资记录','to?page=app/invest/list')" style="text-decoration: none;"><h3><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;投资记录</b></h3></a></li>
                    </ul>
                </div>
                <div title="系统功能">
                   <ul class="easyui-datalist" data-options="selected:true,fit:true,border:false">
                       <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
                       <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0)"  onclick="addTab('参数配置','to?page=system/keyvalue/list')" style="text-decoration: none;"><h3><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;参数配置</b></h3></a></li>
                       <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(0)"  onclick="addTab('系统用户管理','to?page=system/user/slist')" style="text-decoration: none;"><h3><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;系统用户管理</b></h3></a></li>
                       <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/sLogout"><h3><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;退出系统</b></h3></a></li>
                   </ul> 
                </div>
            </div>
            -->
        </div>
        <div data-options="region:'center',iconCls:'icon-ok'" title="展示">
            <div id="tabs" class="easyui-tabs" data-options="fit:true,border:false,plain:true">
                <div title="导读" data-options="href:'about.html'" style="padding:10px"></div>
            </div>
        </div> 
    </body>
    <script type="text/javascript">
    
       function formatTime (number, format) {
	    	 let time = new Date(number)
	    	 let newArr = []
	    	 let formatArr = ['Y', 'M', 'D', 'h', 'm', 's']
	    	 newArr.push(time.getFullYear())
	    	 newArr.push(formatNumber(time.getMonth() + 1))
	    	 newArr.push(formatNumber(time.getDate()))
	    	 
	    	 newArr.push(formatNumber(time.getHours()))
	    	 newArr.push(formatNumber(time.getMinutes()))
	    	 newArr.push(formatNumber(time.getSeconds()))
	    	 
	    	 for (let i in newArr) {
	    	    format = format.replace(formatArr[i], newArr[i])
	    	 }
	    	 return format;
    	}
    
    
	    function addTab(title, url){
	        if ($('#tabs').tabs('exists', title)){
	            $('#tabs').tabs('select', title);
	        } else {
	        	var tabs = $('#tabs').tabs().tabs('tabs');
	        	if(tabs.length>=12){
	        		layer.alert('Tab面板开启过多，请关闭其它暂时用不到的Tab面板！');
	        	}else{
	        		var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
		            
		            $('#tabs').tabs('add',{
		                title:title,
		                content:content,
		                closable:true
		            });
	        	}
	        	
	        }
	    }
	    
	    var data = [{
            text: '功能管理',
            state: 'open',
            iconCls: 'icon-sum',
            children: [{
                text: "<a href=\"javascript:void(0)\"  onclick=\"addTab('用户管理','to?page=app/customer/list')\" style=\"text-decoration: none;\">&nbsp;&nbsp;&nbsp;用户管理</a>"
            },{
                text: "<a href=\"javascript:void(0)\"  onclick=\"addTab('用户留言','to?page=app/msg/list')\" style=\"text-decoration: none;\">&nbsp;&nbsp;&nbsp;用户留言</a>"
            },{
                text: "<a href=\"javascript:void(0)\"  onclick=\"addTab('公告信息','to?page=app/notice/list')\" style=\"text-decoration: none;\">&nbsp;&nbsp;&nbsp;公告信息</a>"
            },{
                text: "<a href=\"javascript:void(0)\"  onclick=\"addTab('注册统计','to?page=app/data/reglist')\" style=\"text-decoration: none;\">&nbsp;&nbsp;&nbsp;注册统计</a>"
            },{
                text: "<a href=\"javascript:void(0)\"  onclick=\"addTab('充值统计','to?page=app/data/rclist')\" style=\"text-decoration: none;\">&nbsp;&nbsp;&nbsp;充值统计</a>"
            }]
        },{
        	text:'资产管理',
        	state:'open',
        	iconCls: 'icon-money',
        	children:[{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('资产管理','to?page=app/account/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;资产管理</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('投资记录','to?page=app/invest/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;投资记录</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('提币记录','to?page=app/btRecord/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;提币记录</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('充币记录','to?page=app/bcRecord/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;充币记录</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('站内转帐','to?page=app/transfer/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;站内转帐</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('充币地址管理','to?page=app/bcAddr/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;充币地址管理</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('提币地址管理','to?page=app/btAddr/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;提币地址管理</a>"
            }]
        },{
        	text:'分润管理',
        	state:'open',
        	iconCls: 'icon-profit',
        	children:[{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('静态分润记录','to?page=app/staticBonus/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;静态分润记录</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('加速分润记录','to?page=app/teamBonus/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;加速分润记录</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('动态分润记录','to?page=app/teamBonus/slist')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;动态分润记录</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('加速分润档次管理','to?page=app/grade/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;加速分润档次管理</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('动态分润档次管理','to?page=app/grade/slist')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;动态分润档次管理</a>"
            }]
        },{
            text: '系统管理',
            state: 'close',
            iconCls: 'icon-setup',
            children: [/* {
                text: "<a href='javascript:void(0)'  onclick=\"addTab('链上查询','to?page=app/trade/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;链上查询</a>"
            }, */{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('参数配置','to?page=system/keyvalue/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;参数配置</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('系统用户管理','to?page=system/user/slist')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;系统用户管理</a>"
            },{
                text: "<a href='javascript:void(0)'  onclick=\"addTab('管理操作日志','to?page=app/operationLog/list')\" style='text-decoration: none;'>&nbsp;&nbsp;&nbsp;管理操作日志</a>"
            },{
                text: "<a href='sLogout'>&nbsp;&nbsp;&nbsp;退出系统</a>"
            }]
        }];
    
    </script>
    
    <script type="text/javascript">
    
		    function fmtValue(value,row,index){
		    	return value+'%'
		    }
		    
		    function tips(msg){
		    	layer.open({
		    		content:msg,
		    		shade:0,
		    		offset: 'rb',
		    		time:2000,
		    		anim: 2
		    	});
		    }
		    
		    function formatNumber (n) {
		    	 n = n.toString()
		    	 return n[1] ? n : '0' + n;
		    }
		    
		    function formatTime (number, format) {
		    	 let time = new Date(number)
		    	 let newArr = []
		    	 let formatArr = ['Y', 'M', 'D', 'h', 'm', 's']
		    	 newArr.push(time.getFullYear())
		    	 newArr.push(formatNumber(time.getMonth() + 1))
		    	 newArr.push(formatNumber(time.getDate()))
		    	 
		    	 newArr.push(formatNumber(time.getHours()))
		    	 newArr.push(formatNumber(time.getMinutes()))
		    	 newArr.push(formatNumber(time.getSeconds()))
		    	 
		    	 for (let i in newArr) {
		    	  format = format.replace(formatArr[i], newArr[i])
		    	 }
		    	 return format;
		    }
    
    </script>
</html>